#!/usr/bin/env python
# currency.py

import math

__version__ = "$Revision: 1.2 $"
__author__  = 'Ramesh Balasubramanian <ramesh@finpy.org>'

def thirtytwo2dec(inNumber, inFraction):
	"""
	-------------------------------------------------------------------------------
	Usage
	
	Notes
	
	Examples
	
	-------------------------------------------------------------------------------
	"""
	
	assert inFraction in range(0,32), "0 <= inFraction < 32 must hold"
	assert inNumber - math.floor(inNumber) == 0, "inNumber must be an integer"
	
	return round(inNumber + (inFraction * 1.0/32), 4)